'use strict'

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = (app) => {
  const { router, controller } = app
  router.get('/', controller.home.index)
  router.post('/api/post-test', controller.home.postTest)
  router.get('/api/get-test', controller.home.getTest)
  // 上传
  router.post('/api/upload', controller.home.upload)
  // multipartUpload
  router.post('/api/multipartUpload', controller.home.multipartUpload)
  // getImage
  router.post('/api/getImage', controller.home.getImage)
  // deleteFile
  router.post('/api/deleteFile', controller.home.deleteFile)

  // 邮箱
  router.post('/api/email', controller.home.emailValidate)
}
